import bb.cascades 1.2
import "../lib"
import bb.WebImageView 1.4

Padding {
    property alias title: m_title.text
    property alias thumbnail: m_thumbnail.url
    property int screenWidth
    
    layout: StackLayout {
        orientation: LayoutOrientation.TopToBottom
    }
    
    Divider {
        opacity: 0.0
        topMargin: 0
        bottomMargin: 0
    }
    
    Container {
        layout: AbsoluteLayout {
        }
        
        Container {
            WebImageView {
                id: m_thumbnail
                scalingMethod: ScalingMethod.AspectFill
                preferredWidth: 132*1.5
                preferredHeight: 94*1.5
            }
        }
        
        Container {
            layoutProperties: AbsoluteLayoutProperties {
                positionX: 132*1.5 + 10
            }
            
            preferredWidth: screenWidth - 132*1.5 - 10
            
            Container {
                Label {
                    id: m_title
                    multiline: true
                    textStyle.base: com.titleStyle
                } 
            }
            
            Container {
                background: Color.create("#FFFF0000")
                Label {
                    textStyle.base: com.typeStyle
                    text: "Topic"
                }  
            }

        }
    }
    
    Common {
        id: com
    }
}
